package mww.javabean.dao;

import java.util.List;
import java.util.Map;

import mww.javabean.entity.TeacherC;

public interface TeacherCDao {
	// 添加教师任课信息
	public void addTeacherC(TeacherC teacherC);

	// 删除教师任课信息(实为修改数据库中status状态)
	public void delTeacherC(String teacherNo, String courseNo,Integer teTeacherNo);

	// 根据教师编号和审核状态查找任课信息
	public Map findTeacherCByTeacherNo(String teacherNo, Integer status, Integer curPage);

	// 根据课程编号，教学班号查询教师编号
	public String findTeacherNo(String courseNo, Integer tcTeacherNo);

	// 根据课程编号，教学班号查询上课时间
	public String findTcTime(String teacherNo,String courseNo, Integer tcTeacherNo);

	// 增加选课人数
	public void incTcSel(String teacherNo, String courseNo,Integer tcTeacherNo);

	// 减少选课人数
	public void decTcSel(String teacherNo, String courseNo,Integer tcTeacherNo);

	// 查询任课信息审核状态
	public Integer findStatus(String teacherNo, String courseNo,Integer tcTeacherNo);

	// 更新任课信息审核状态
	public void updateStatus(String teacherNo, String courseNo,Integer tcTeacherNo, Integer status);

	// 更新任课中最高成绩、最低成绩、平均成绩
	public void updateScoreInTeacherC(String teacherNo, String courseNo,Integer tcTeacherNo, float maxScore, float minScore,
			float avgScore);

	public TeacherC findTeacherCById(String teacherNo, String courseNo,Integer tcTeacherNo);
	
	// 列表显示所有教师任课信息列表--分页
	public Map findAllTeacherC(int curPage);

	// 多条件查询教师任课信息-带分页
	public Map findAllTeacherCByMostCon(TeacherC condition, int curPage);

	public boolean checkTeacherCExistByCourseNo(String courseNo);

	public boolean checkTeacherCExistByTeacherNo(String teacherNo);
	//检测冲突
	public boolean checkExistConflict(String teacherNo,String courseNo,Integer tcTeacherNo);

	//检测冲突
	public boolean checkTimeConflict(String teacherNo,String tcTime);
}
